libglnx porting: xattr calls
authorColin Walters <walters@verbum.org>
Thu, 17 Mar 2016 15:02:48 +0000 (11:02 -0400)
committerColin Walters <walters@verbum.org>
Fri, 18 Mar 2016 16:08:19 +0000 (12:08 -0400)
These are straightforward as the libgsystem versions were already just
equivalent shims.

src/libostree/ostree-core.c
src/libostree/ostree-diff.c
src/libostree/ostree-repo-checkout.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo.c
src/libostree/ostree-sysroot-deploy.c

index 11c61f95340f119549b0229e8d6576943a78f082..219eb2b7f270554c2255e98a9a0237be61b47f28 100644 (file)
@@ -766,7 +766,8 @@ ostree_checksum_file (GFile            *f,
 
   if (objtype == OSTREE_OBJECT_TYPE_FILE)
     {
-      if (!gs_file_get_all_xattrs (f, &xattrs, cancellable, error))
+      if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (f),
+                                         &xattrs, cancellable, error))
         goto out;
     }
 
index c47e98c5bdfeb1f517eea3dd815f4e0404a8c1b3..4b733461d00fe4b2c4441b786cddc4022a4c0fdf 100644 (file)
@@ -48,7 +48,8 @@ get_file_checksum (OstreeDiffFlags  flags,
 
       if (!(flags & OSTREE_DIFF_FLAGS_IGNORE_XATTRS))
         {
-          if (!gs_file_get_all_xattrs (f, &xattrs, cancellable, error))
+          if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (f),
+                                             &xattrs, cancellable, error))
             goto out;
         }
 
index 0879f44b333712ba3f7c802e88a5e212612cfb3c..ea70fd36cbd7b3dbff00681d12deeb81176117ce 100644 (file)
@@ -159,7 +159,7 @@ write_regular_file_content (OstreeRepo            *self,
               
       if (xattrs)
         {
-          if (!gs_fd_set_all_xattrs (fd, xattrs, cancellable, error))
+          if (!glnx_fd_set_all_xattrs (fd, xattrs, cancellable, error))
             goto out;
         }
     }
@@ -220,7 +220,7 @@ checkout_file_from_input_at (OstreeRepo     *self,
 
           if (xattrs)
             {
-              if (!gs_dfd_and_name_set_all_xattrs (destination_dfd, destination_name,
+              if (!glnx_dfd_name_set_all_xattrs (destination_dfd, destination_name,
                                                    xattrs, cancellable, error))
                 goto out;
             }
@@ -288,7 +288,7 @@ checkout_file_unioning_from_input_at (OstreeRepo     *repo,
           
       if (xattrs)
         {
-          if (!gs_dfd_and_name_set_all_xattrs (destination_dfd, temp_filename,
+          if (!glnx_dfd_name_set_all_xattrs (destination_dfd, temp_filename,
                                                xattrs, cancellable, error))
             goto out;
         }
@@ -668,7 +668,7 @@ checkout_tree_at (OstreeRepo                        *self,
 
       if (xattrs)
         {
-          if (!gs_fd_set_all_xattrs (destination_dfd, xattrs, cancellable, error))
+          if (!glnx_fd_set_all_xattrs (destination_dfd, xattrs, cancellable, error))
             goto out;
         }
     }
index a7c16192aeb5147964b327e4a8f3f24bb01c1d08..94c9f730dce13ca203ae81c718f4404c4a37766f 100644 (file)
@@ -219,7 +219,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
 
       if (xattrs != NULL)
         {
-          if (!gs_dfd_and_name_set_all_xattrs (self->tmp_dir_fd, temp_filename,
+          if (!glnx_dfd_name_set_all_xattrs (self->tmp_dir_fd, temp_filename,
                                                xattrs, cancellable, error))
             goto out;
         }
@@ -251,7 +251,7 @@ commit_loose_object_trusted (OstreeRepo        *self,
 
           if (xattrs)
             {
-              if (!gs_fd_set_all_xattrs (fd, xattrs, cancellable, error))
+              if (!glnx_fd_set_all_xattrs (fd, xattrs, cancellable, error))
                 goto out;
             }
         }
@@ -2322,20 +2322,21 @@ get_modified_xattrs (OstreeRepo                       *self,
     {
       if (path)
         {
-          if (!gs_file_get_all_xattrs (path, &ret_xattrs, cancellable, error))
+          if (!glnx_dfd_name_get_all_xattrs (AT_FDCWD, gs_file_get_path_cached (path),
+                                             &ret_xattrs, cancellable, error))
             goto out;
         }
       else if (dfd_subpath == NULL)
         {
           g_assert (dfd != -1);
-          if (!gs_fd_get_all_xattrs (dfd, &ret_xattrs,
+          if (!glnx_fd_get_all_xattrs (dfd, &ret_xattrs,
                                      cancellable, error))
             goto out;
         }
       else
         {
           g_assert (dfd != -1);
-          if (!gs_dfd_and_name_get_all_xattrs (dfd, dfd_subpath, &ret_xattrs,
+          if (!glnx_dfd_name_get_all_xattrs (dfd, dfd_subpath, &ret_xattrs,
                                                cancellable, error))
             goto out;
         }
index d4539ba06d45f7cbf29f705187e0aa187be8b745..a0e45c361c77eb247d3f8ab938cd4f0e100cbcde 100644 (file)
@@ -2951,7 +2951,7 @@ ostree_repo_load_file (OstreeRepo         *self,
 
                   if (out_xattrs)
                     {
-                      if (!gs_fd_get_all_xattrs (fd, &ret_xattrs,
+                      if (!glnx_fd_get_all_xattrs (fd, &ret_xattrs,
                                                  cancellable, error))
                         goto out;
                     }
@@ -2965,7 +2965,7 @@ ostree_repo_load_file (OstreeRepo         *self,
               else if (g_file_info_get_file_type (ret_file_info) == G_FILE_TYPE_SYMBOLIC_LINK
                        && out_xattrs)
                 {
-                  if (!gs_dfd_and_name_get_all_xattrs (self->objects_dir_fd, loose_path_buf,
+                  if (!glnx_dfd_name_get_all_xattrs (self->objects_dir_fd, loose_path_buf,
                                                        &ret_xattrs,
                                                        cancellable, error))
                     goto out;
index ea0db9ba2f0d6ffd8f6cf9801c40c6b3c587ba77..5779d7c85e474c70f2740ebd5efadbdcb7693dc0 100644 (file)
@@ -97,10 +97,10 @@ dirfd_copy_attributes_and_xattrs (int            src_parent_dfd,
    * right.  This will allow other users access if they have ACLs, but
    * oh well.
    */ 
-  if (!gs_dfd_and_name_get_all_xattrs (src_parent_dfd, src_name,
+  if (!glnx_dfd_name_get_all_xattrs (src_parent_dfd, src_name,
                                        &xattrs, cancellable, error))
     goto out;
-  if (!gs_fd_set_all_xattrs (dest_dfd, xattrs,
+  if (!glnx_fd_set_all_xattrs (dest_dfd, xattrs,
                              cancellable, error))
     goto out;